From: Ray Strode Date: Mon, 18 Mar 2013 05:14:44 +0000 (-0400) Subject: unlockDialog: ignore resets after success X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4435 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f72f501931bd032e2699ff6ceb5228fb3daec094;p=gnome-shell.git unlockDialog: ignore resets after success GDM sends a reset signal after verification succeeds so that a user-switched login screen can prepare for the next time it's going to be used. The unlock screen treats resets as failures, though. This means, on success, we're emitting "failed" and clearing any last second messages. This commit changes the unlock code to ignore resets from GDM after successful verification. https://bugzilla.gnome.org/show_bug.cgi?id=694688 --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 70452a8de..f9227a34c 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -47,6 +47,7 @@ const UnlockDialog = new Lang.Class({ this._greeterClient = new Gdm.Client(); this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly: true }); + this._userVerified = false; this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion)); this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage)); @@ -250,18 +251,22 @@ const UnlockDialog = new Lang.Class({ }, _onVerificationComplete: function() { + this._userVerified = true; this._userVerifier.clear(); this.emit('unlocked'); }, _onReset: function() { - this._userVerifier.clear(); - this.emit('failed'); + if (!this._userVerified) { + this._userVerifier.clear(); + this.emit('failed'); + } }, _onVerificationFailed: function() { this._currentQuery = null; this._firstQuestion = true; + this._userVerified = false; this._promptEntry.text = ''; this._promptEntry.clutter_text.set_password_char('\u25cf');